home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_gen
/
t4diblib.zip
/
ANIMATE5.F3_
/
ANIMATE5.F3
Wrap
Text File
|
1995-11-14
|
3KB
|
123 lines
VERSION 2.00
Begin Form Form1
Caption = "ANIMATE5"
ClientHeight = 1680
ClientLeft = 1200
ClientTop = 1572
ClientWidth = 2880
Height = 2100
Left = 1152
LinkTopic = "Form1"
ScaleHeight = 1680
ScaleWidth = 2880
Top = 1200
Width = 2976
Begin T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 4
Left = 1680
Top = 960
Visible = 0 'False
Width = 972
End
Begin T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 3
Left = 1560
Top = 840
Visible = 0 'False
Width = 972
End
Begin T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 2
Left = 1440
Top = 720
Visible = 0 'False
Width = 972
End
Begin T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 1
Left = 1320
Top = 600
Visible = 0 'False
Width = 972
End
Begin CommandButton Command1
Caption = "&Quit"
Height = 372
Left = 120
TabIndex = 0
Top = 1200
Width = 1452
End
End
Option Explicit
Declare Function GlobalFree% Lib "kernel" (ByVal h%)
Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
Dim TimeIn!
Dim Frames%
Sub Command1_Click ()
Terminate
End Sub
Sub Form_Load ()
Dim loopctr%, memctr%, framectr%
Top = (screen.Height - Height) / 2!
Left = (screen.Width - Width) / 2!
'dilib(1) has the 'real' hLib
dilib1(1).LibraryName = "bluespin.ilb"
dilib1(1).Action = IM_ACTION_OPENLIBRARY
Show
Frames = 0
TimeIn = Timer
For memctr = 1 To 4
If memctr > 1 Then
'Clone the hLib into dilibs 2-4.
dilib1(memctr).hLib = dilib1(1).hLib
End If
'One image per dilib1.
dilib1(memctr).MemberNumber = memctr
dilib1(memctr).Action = IM_ACTION_GETMEMBER
Next
For loopctr = 1 To 100
For memctr = 1 To 4
'Disregard comments for tutorial.
'Moving image
'image1.Left = image1.Left + screen.TwipsPerPixelX
'image1.Top = image1.Top + screen.TwipsPerPixelY
'image1.Picture = dilib1(memctr).Picture
'image1.Refresh
Picture = dilib1(memctr).Picture
Frames = Frames + 1
Next memctr
DoEvents
Next loopctr
Terminate
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub
Sub Terminate ()
Dim TimeOut!, TimeElapsed!, fps!
TimeOut = Timer
TimeElapsed = TimeOut - TimeIn
fps = Frames
fps = Frames / TimeElapsed
MsgBox Trim$(Str$(fps)) + " frames per second."
End
End Sub